﻿using Logistics.Web.Models.Common;
using Nop.Core.Domain.Logistics;
using Nop.Core.Domain.Shipping;
using Nop.Services.Shipping.Tracking;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace Logistics.Web.Models.Track
{
    public partial class PackageTrackingModel
    {
        public PackageTrackingModel() { 
            IsShipmentComplete = false;
            IsOwnershipVerified = false;
            CanVerify = false;
            CanCancel = false;
            CanChangeDeliveryAddress = false;
            CanChangePickUpAddress = false;
            CanRescheduleDelivery = false;
            CanReschedulePickUp = false;
            DisplayedEventsBarLocation = 0;
            DisplayedStatusType = 1;
        }
        public string TrackingNumber { get; set; }
        public ShippingStatus CurrentStatus { get; set; }
        public IList<ShipmentStatusEvent> StatusEvents { get; set; }
        public IList<DisplayedShipmentStatusEvent> DisplayedEvents { get; set; }
        public int DisplayedEventsBarLocation { get; set; }
        public int DisplayedStatusType { get; set; }
        public AddressModel PickUpAddress { get; set; }
        public AddressModel DeliveryAddress { get; set; }
        public bool IsShipmentComplete { get; set; }
        public bool IsOwnershipVerified { get; set; }
        public bool CanVerify { get; set; }
        public bool CanCancel { get; set; }
        public bool CanChangeDeliveryAddress { get; set; }
        public bool CanChangePickUpAddress { get; set; }
        public bool CanReschedulePickUp { get; set; }
        public bool CanRescheduleDelivery { get; set; }

        public IList<string> Notifications { get; set; }

        #region Nested Classes
        public class DisplayedShipmentStatusEvent {
            public string EventName { get; set; }
            public int BarWidth { get; set; }
        }
        #endregion

    }
}